#include<iostream>
#include<gtest/gtest.h>

class MyEvent : public testing::Environment
{
public:
    virtual void SetUp()override
    {
        std::cout<<"测试环境初始化成功"<<std::endl;
    }
    virtual void TearDown()override
    {
        std::cout<<"测试完毕，进行清理"<<std::endl;
    }
};
TEST(MyEvent,test1)
{
    std::cout<<"test1"<<std::endl;
}
TEST(MyEvent,test2)
{
    std::cout<<"test2"<<std::endl;
}
int main(int argc,char* argv[])
{
    testing::InitGoogleTest(&argc,argv);
    testing::AddGlobalTestEnvironment(new MyEvent);
    RUN_ALL_TESTS();
    return 0;
}